home *** CD-ROM | disk | FTP | other *** search
- ; AEGiS CoRP Battle Field - Data file structure
- ; -----------------------------------------------------------------------------
- ;
- ; This file format may be freely used by anybody.
- ; Anybody may put new topics ([...]) provided that it doesn't disturb
- ; any other program that share those files
- ;
- ; This file structure is a good way to share datas on different users
- ; especially because the algorythm for the filename creation provide a pretty
- ; good way to make one file for one user without computing a CRC (available
- ; only to PPLC 3.0)
- ;
- VINCENT NEGRIER ; User Name
- 132 ; Credits left
- [iS_HaTiNG] ; Block Header [iS_HaTiNG]
- oLiVieR LaNGLoiS ; \ List of hated
- BiSouNouRS NuaGe ; / users
- [eND] ; End of block [is_hating]
- [iS_HaTeD_BY] ; Block Header [iS_HaTeD_BY]
- FRaNCiS GaSTeLLu ; Liste of user that hate this one
- [eND] ; End of block [iS_HaTeD_BY]
- [MeSSaGeS_WaiTiNG] ; Block Header [MeSSaGeS_WaiTiNG]
- [BeGiN_MeSSaGe] ; Block Header [BeGiN_MeSSaGe]
- AGS BaTTLe FieLD ; Sender's name
- 0 ; Anonymous ? (0 = No, 1 = Yes)
- YouR BRiBe TRy WiTH ; Message - Line 1
- FRANCIS GASTELLU ; 2
- WaS SuCCeSSFuL ! ; 3
- ; 4 All messages must be 16 lines long
- ; 5 All lines must be 22 chars long max!
- LeT'S HoPe THaT THe GuY ; 6
- WiLL NoT oNLY TaKE ; 7
- THe CReDiTZ ! ; 8
- ; 9
- ; 10
- ; 11
- ; 12
- ; 13
- ; 14
- ; 15
- ; 16
- [eND_MeSSaGe] ; End of block [BeGiN_MeSSaGe]
- [eND] ; End of block [MeSSaGeS_WaiTiNG]
- [BRiBe_GiFT] ; Block Header [BRiBe_GiFT]
- [BeGiN_BRiBe_GiFT] ; Block Header [BeGiN_BRiBe_GiFT]
- FRaNCiS GaSTeLLu ; Sender's name
- 0 ; Anonymous ? (0 = No, 1 = Yes)
- 100 ; Number of credits given
- Salut ! ; Attached message - line 1
- ligne 2 ; 2
- 3 ; 3
- 4 ; 4 All messages must be 11 lines long
- 5 ; 5 All lines must be 22 chars long max!
- 6 ; 6
- 7 ; 7
- 8 ; 8
- 9 ; 9
- 10 ; 10
- Ligne 11 ; 11
- [eND_BRiBe_GiFT] ; End of block [BeGiN_BRiBe_GiFT]
- [eND] ; End of block [BRiBe_GiFT]
- [DeCLaRaTioNS] ; Block Header [DeCLaRaTIoNS]
- [BeGiN_DeCLaRaTioN] ; Block Header [BeGiN_DeCLaRaTioNS]
- FRaNCiS GaSTeLLu ; Sender's name
- 0 ; Anonymous ? (0 = No, 1 = Yes)
- The sysop has a very ; Attached message - ligne 1
- small dick ! :) ; 2
- ; 3
- ; 4 All messages must be 11 lines long
- ; 5 All lines must be 22 chars long max!
- ; 6
- ; 7
- ; 8
- ; 9
- ; 10
- ; 11
- [eND_DeCLaRaTioN] ; End of block [BeGiN_DeCLaRaTioNS]
- [eND] ; End of block [DeCLaRaTioNS]
- [eND_DaTa] ; End of file
- ;
- ;
- ; All topics between brackets (ie : [eND]) are CASE SENSITIVE...
- ; There may be an unlimited number of msgs in the blocks [MeSSaGeS_WaiTiNG],
- ; [BRiBe_GiFT] and [DeCLaRaTioN].
- ;
- ; Blocks may be in random order... All sub-blocks must reside within it's
- ; main block ([BeGiN_DeCLaRaTioN] must be between [DeCLaRaTioNS] and [eND])
- ;
- ; Any block must be UNIQUE!
- ;
- ; The filename is built as follow :
- ;
- ; The name of the user must be uppercase without any trailing or leading
- ; space. Take now the 3 firsts letters of this string, and the 4 lasts...
- ; ie :
- ;
- ; VINCENT NEGRIER -> VINRIER
- ;
- ; Then add all ascii of each char that make the name and convert in hex...
- ; ie :
- ;
- ; VINCENT NEGRIER -> 1091 -> 443h
- ;
- ; End the filename with the result...
- ;
- ; ie :
- ;
- ; VINCENT NEGRIER -> VINRIER4.43
- ;
- ; This algorythm allow to have 2 users that have the same heading and
- ; trailing letters that have 2 different files
- ;
- ; All those files are in the DATA subdirectory
- ;
- ; In the AGSBF directory are those files :
- ;
- ; USER.LST -> List of all BBS users in MiXeD CaSe
- ; TOTAL.DAT -> # of users in USER.LST
- ; REGD.DAT -> List of all AGSBF users
- ; NUSERS.DAT -> # of users in REGD.DAT
- ; WAR.CFG -> Config file (see AGSBF.DOC)
- ;
- ;
- ; -+-
- ; Source code to make a filename with a user name :
- ;
- ;
- ; Variables used :
- ;
- ; Dest..................................User Name
- ; Temp..................................Work variable
- ; File..................................Resulting filename
- ; A.....................................Work variable
- ; B.....................................Work variable
- ;
- ;
- String Dest,Temp,File
- Integer b,a,btmp
-
- ; Here we add all ascii values into b
- b = 0
- for a = 1 to len(Dest)
- b = b + Asc(Mid(Dest,a,1))
- next
-
- ; We change this value into an hex string
- Temp = I2s(b,16)
-
- ; We replace any unallowed char with "_"
- Dest = Replace(Dest, ".", "_")
- Dest = Replace(Dest, "*", "_")
- Dest = Replace(Dest, "?", "_")
- Dest = Replace(Dest, "\", "_")
- Dest = Replace(Dest, "/", "_")
- Dest = Replace(Dest, ":", "_")
- Dest = Replace(Dest, ";", "_")
- Dest = Replace(Dest, ",", "_")
- Dest = Replace(Dest, "=", "_")
- Dest = Replace(Dest, "+", "_")
- Dest = Replace(Dest, chr(34), "_")
- Dest = Replace(Dest, "[", "_")
- Dest = Replace(Dest, "]", "_")
- Dest = Replace(Dest, "<", "_")
- Dest = Replace(Dest, ">", "_")
- for btmp = 0 to 31
- Dest = Replace(Dest, chr(btmp), "_")
- next
-
- ; And we make the filename :)
- File = Trim(PPEPATH()+"DATA\"+LEFT(Trim(Dest," "),3)+RIGHT(Trim(Dest," "),4)+left(Temp,1)+"."+Mid(Temp,2,3)," ")
- ;
- ;
- ;
- ;
- ;
- ; If you use PCB 15.2 and PPLC 3.01, you may change this piece of code into a
- ; function... this will make it much more easier to use...
- ;
- ;
- ;
- ; Well, I think you have everything you need to start coding some nice addons
- ; for the battle field :) I hope this will give some work for people that
- ; dunno what to code anymore... :)
- ;
- ; _.Lone Runner/AGS'94
-